package com.exampletest.mapper;

import com.exampletest.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    int insertUser(User user);
    User findByUsername(@Param("username") String username);
    List<User> findAllUsers();
    User findById(@Param("id") Integer id);
    int updateUser(User user);
    int deleteById(@Param("id") Integer id);
    int updateStatus(@Param("id") Integer id, @Param("status") Integer status);
    List<User> searchUsers(@Param("keyword") String keyword);

}